Find / Replace Text
Previous  Top  Next



Use the following commands and functions to search or replace text in the active document. Special instructions are also available to search and process fields in delimited (tab, colon, or other) text files.


Commands:

^!Find "SearchText" [Options TCIBGWHRS]

Searches for the specified text. Tab and line break characters should be replaced by their tokens (^T and ^P respectively). You can use the following optional settings:
T
: Does not search for whole words only (search string can be found within longer words).
C
: Searches for whole words only.
If the options T
or C are not used, NoteTab will search for whole words if the search criteria does not contain spaces or other word delimiting characters. If the search criteria contains such delimiters, then NoteTab will accept matches that are not whole words.
I
: Ignores character case.
B
: Searches backwards.
G
: Global scope; searches through all the open documents.
W
: Searches through the whole document (not just from the cursor position).
H
: Only searches within selection if text is highlighted (setting ignored if no text selected).
R
: Specifies that the search criteria represents a regular expression.
S
: Silent search. NoteTab will not display any message box.
The following example will find the next occurrence of the word NoteTab starting from the cursor position. If a match is not found in the current document, the other open documents will also be searched:
^!FIND "NoteTab" G

The search criteria must always be placed between double quotes if you don't specify search options.

^!Replace "SearchText" >> "ReplaceText" [Options TCIBGWHRSA]

or
^!Replace SearchText   ReplaceText   [Options TCIBGWHRSA]

Similar to the "^!Find" command but replaces matches with the replace criteria. The first format uses spaces to separate parameters and the second uses a tab character. Use one or the other but do not mix the two formats within an instruction. You can use the following optional setting, which is specific to the Replace command:
A
: Use to replace all matched occurrences. When this option is not used, only the first match is replaced.
The following Clip example will search all open documents and replace the listed upper case HTML tags to their lower case equivalent:
^!Replace <B>   <b>   GA
^!Replace </B>   </b>   GA
^!Replace <I>   <i>   GA
^!Replace </i>   </i>   GA

^!SetDelimiter "Delimiter"

Defines field delimiter used by "GetField" and "GetPosInField" functions.


Functions:

^$GetField(Row;Col)$

Returns the field text found at the specified row and data column in a delimited file. Set Row to -1 to indicate the current line.

^$GetPosInField(Row;Col;Options;"SearchCriteria")$

Returns the position of a search criteria in the specified field in a delimited text. No match returns 0. You can use the following optional settings:
T
: Does not search for words only (search string can be found within longer words)
I
: Ignore character case
W
: Criteria must match whole field
S
: Criteria must be at start of field